/**
 * 广寒宫
 * 网址:www.guanghangong.xyz
 */
package org.moon.framework.autoconfigure.springmvc.response;

import lombok.Getter;

/**
 * 错误代码
 * @author moon
 */
@Getter
public enum RCode {

    SUCCESS(200, "操作成功"),
    FAIL(500, "操作失败"),

    FEIGN_ERROR(600,"服务熔断降级"),
    FLOW_LIMITING(601, "系统限流"),

    PARAM_ERROR(400,"参数错误"),
    FORM_REPEAT_SUBMIT(401, "服务器有点小累，请您稍后再试"),

    SECURITY_ACCESS_DENIED(702, "您的访问未授权，请联系管理员"),
    SECURITY_AUTHENTICATION(701, "身份验证失败,请输入正确信息"),

    USER_NOT_EXIST(901,"账号不存在"),
    USERNAME_OR_PASSWORD_ERROR(902,"账号或者密码错误"),
    USER_EXCEPTION(902,"账号异常，请联系管理员");
    
    private int code = 200;
    private String msg = "操作成功";

    RCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}